Skip to main content

Token Info

Queries token information for the specified CW20 address and chain.

query Cw($contract: String!, $chainUid: String!) {
cw(contract: $contract, chain_uid: $chainUid) {
token_info {
name
symbol
decimals
total_supply
}
}
}

Example

curl --request POST \
--header 'content-type: application/json' \
--url 'https://testnet.api.euclidprotocol.com/graphql' \
--data '{"query":"query Cw($contract: String!, $chainUid: String!) {\n cw(contract: $contract, chain_uid: $chainUid) {\n token_info {\n name\n symbol\n decimals\n total_supply\n }\n }\n}","variables":{"chainUid":"stargaze","contract":"stars153umqx0alxjpckcrdkl06z5ysft6w5fjs5ydhtduu2jak4fzut9sx2wsu0"}}'

Open in Playground

Arguments

  • chainUid (String!): The unique Id for the chain that the CW20 is deployed on.
  • contract (String!): The contract address of the CW20 contract.

Return Fields

FieldTypeDescription
nameStringThe name of the token.
symbolStringThe symbol of the token.
decimalsu8The number of decimal places of the token.
total_supplyUint128The total supply of the token.